package com.ryenlii.datatrans.common.model;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.List;


/**
 * 请求Model
 *
 * @author zhengwen
 */
@Data
@Accessors(chain = true)
public class RequestModel<T> {

    /**
     * 分页参数
     */
    private Page page;

    /**
     * 业务相关的查询参数
     */
    private T customQueryParams;

    /**
     * 查询时排序参数
     */
    private List<SortModel> sorts;

    public RequestModel() {
    }

    public RequestModel(Page page, T customQueryParams) {
        this.page = page;
        this.customQueryParams = customQueryParams;
    }

    public Page getPage() {
        return page;
    }

    public void setPage(Page page) {
        this.page = page;
    }

    public T getCustomQueryParams() {
        return customQueryParams;
    }

    public void setCustomQueryParams(T customQueryParams) {
        this.customQueryParams = customQueryParams;
    }
}
